home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
text
/
tex
/
tpp410n.lha
/
TPPGlobal.lha
/
rexx
/
tpl
/
ShowLogfile.tpl
< prev
next >
Wrap
Text File
|
1993-01-17
|
2KB
|
66 lines
/* Show Logfile - Macro */
/* Kick 2.0 only */
options results
binary='C:Type'
output='>"CON:0/16/700/440/Show Logfile/AUTO/WAIT/ALT/INACTIVE/SCREENTextPlus"'
hailstring='Show Logfile'
address 'TextPlus'
/* get name of current file */
'GetName'
filename = result
/* strip off extension */
if RIGHT(filename, 4) == '.tex' | RIGHT(filename, 4) == '.tpp' then do
len = LENGTH(filename) - 4
filename = LEFT(filename, len)
end
'RequestString' hailstring'\\'filename
showopts = result
n = WORDS(showopts)
fullname = WORD(showopts, n)
n = LENGTH(showopts) - LENGTH(fullname)
printopts = LEFT(showopts, n)
PARSE VALUE namestruc(fullname) WITH ivol idirs ibase .
IF fullname == "" then empty = 'true'
else empty = 'false'
IF "" == SUBSTR(fullname, 1+ivol+idirs+ibase) THEN DO
fullname = fullname||".log" /* supply a default extension */
ibase = ibase + 4
END
IF 0 = ivol THEN DO
direc = PRAGMA('d')
IF RIGHT(direc,1)~='/' & RIGHT(direc,1)~=':' THEN direc=direc||'/'
fullname = direc||fullname
DROP direc
END
ELSE DO
direc = SUBSTR(fullname, 1, ivol+idirs)
IF RIGHT(direc,1) = '/' THEN DO
n = LENGTH(direc)
direc = LEFT(direc, n-1)
END
call pragma 'Directory', direc
END
DROP ivol idirs ibase
/* valid filename ? */
if empty = 'false' then do
/* address command wbtofront 'Workbench'*/
address command binary output fullname
end
else
'Display' 'Show Logfile --- Abbruch'